const paging_fun = (actionRef: any) => {
  const pageInfo: any = actionRef.current?.pageInfo;
  if (pageInfo?.pageSize * pageInfo.current - pageInfo?.total === pageInfo?.pageSize - 1) {
    if (pageInfo.current === 1) {
      if (actionRef.current?.setPageInfo) {
        actionRef.current.setPageInfo({ current: 1 });
      }
    } else {
      if (actionRef.current?.setPageInfo) {
        actionRef.current?.setPageInfo({ current: pageInfo.current - 1 });
      }
    }
  }
};
export default paging_fun;
